#ifndef __CMN_H
#define __CMN_H

/* Includes --------------------------------------------------------------------------------*/
#include <stdint.h>
#include <string.h>

/* Define ----------------------------------------------------------------------------------*/

/* Macro -----------------------------------------------------------------------------------*/
/* Typedef ---------------------------------------------------------------------------------*/
typedef struct
{
    uint64_t old;                                
    uint64_t current;
}STD_TIME_STAMP;

/* Variables -------------------------------------------------------------------------------*/
/* Prototypes ------------------------------------------------------------------------------*/
/* Functions -------------------------------------------------------------------------------*/

extern void Cmn_byteToHexchar(uint8_t data, uint8_t* result);
extern void Cmd_int8uToString(uint8_t data, uint8_t* result);
extern void Cmd_int32uToString(uint32_t data, uint8_t* result);
extern uint32_t Cmd_isequalString(uint8_t* a, uint8_t* b);
extern uint32_t Cmd_isequalByteArray(uint8_t* a, uint8_t* b, uint32_t length);
extern uint32_t replaceCharinString(uint8_t* result, uint8_t* in, uint8_t p_char);
extern uint32_t BEBufToUint32(uint8_t *_pBuf);

extern void int_to_str(int _iNumber, char *_pBuf, unsigned char _len);

extern void Hextodump(uint8_t* data,uint32_t length);
extern void HexToAscll(uint8_t * _pHex, char *_pAscii, uint16_t _BinBytes);
void Int2Str(int32_t num,char *ptr);

extern int mark_7e_encode(unsigned char *in, int in_len, unsigned char *out, int *out_len);
extern int mark_7e_decode(unsigned char *in, int in_len, unsigned char *out, int *out_len);

unsigned char FW_Xor(unsigned char *pData,int nLength);
uint8_t stlen_u8(const  uint8_t *_Str);

int float_to_int(float f);

#endif

